//回到顶部
let _top=document.querySelector('.back-top')
let rightNav=document.querySelector('.right-nav')





// 当网页向下滑动 120px 出现"回顶部" DIV
window.onscroll = function() {scrollFunction()}; 
function scrollFunction() {

    if (document.body.scrollTop > 120 || document.documentElement.scrollTop > 120) {
       _top.style.display = "block";
       rightNav.style.bottom ='160px';
    } else {
       _top.style.display = "none";
       rightNav.style.bottom ='110px';
    }
}
 
// 点击back-top DIV，返回顶部
function topFunction() {
    document.body.scrollTop = 0;
    document.documentElement.scrollTop = 0;
}
